{extend name="default/template/base_index" /}


{block name="area_header"}

<script type="text/javascript" src="__CDN__/jquery-validation/1.13.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="__CDN__/jquery-validation/1.13.1/localization/messages_zh.min.js"></script>

<style type="text/css">
    input.error {
        border: 1px solid red;
    }

    label.checked {

        padding-left: 25px;
    }

    label.error {
        padding-left: 25px;
        padding-bottom: 2px;
        font-weight: bold;
        color: #EA5200;
    }
</style>

{/block}

{block name="area_body"}
{include file="default/Widget/topbar" /}
<div class="admin-main container-fluid">
    {include file="default/Widget/left" /}
    <div class="admin-main-content">
        {include file="default/Widget/breadcrumb" /}
        <div class="margin-sm">
            <a class="btn btn-default btn-sm" href="{$_g_ret_url}" target="_self"><i class="fa fa-reply"></i>返回</a>
        </div>

        <h2>用户角色分配</h2>
        <form class="form-horizontal well role_forms">

            <div class="margin-sm">
                <a target-form="role_forms" class="btn btn-primary ajax-post confirm" href="{:url('Member/user_role')}?id={$id}"><i class="fa fa-save"></i> 保存</a>
            </div>

            {volist name="roles" id="vo"}
                <div class="checkbox">
                    <label>
                        <input {in name="$vo['id']" value="$role_ids"}checked{/in} class="" value="{$vo.id}" name="roles[]" type="checkbox" /> {$vo.title} - {$vo.notes}
                    </label>
                </div>
            {/volist}

        </form>

    </div>
    <!-- END admin-main-content -->
</div>
<!-- END admin-main-->
{/block}

{block name="area_footer"}

<script type="text/javascript">
    $(function() {

    }); //end ready
</script>

{/block}